#ifndef _SIMILIAR_H
#define _SIMILIAR_H

#include "../../VirtualFactory.h"

#include "../../SparseData.h"

class Similar :
    public VirtualFactory
{
public:

    Similar(void)
    {
    }

public:

    virtual ~Similar(void)
    {
    }

public:

    static STRING insName()
    {
        return "Euclid";
    }

public:

    static Similar* newInstance(IN STRING _insName, IN MemoryManager* _memM);

    static VOID deleteInstance(INOUT VOID* _ptr, IN STRING _insName, IN MemoryManager* _memM);

    virtual double sim(IN SparseData& _v1, IN SparseData& _v2);

    template<typename T>
    static T sqr(IN T _v);
};

#endif // #ifndef _SIMILIAR_H